
function Senior(){

    // layui.use('form', function(){
    //     var form=layui.form;
    //
    //     var val = form.val("formfilter");
    //     parent.shai(val.userAccount,val.idCard,val.phone,val.userEmail);
    //     var index = parent.layer.getFrameIndex(window.name);
    //     parent.layer.close(index);
    // });

    layui.use('form',function (){
        var form = layui.form;

        let val = form.val('formfilter');
        parent.shai(val.userAccount,val.idCard,val.phone,val.userEmail);
        console.log(val);
        seniorcat(val);
    })
    }
    function seniorcat(d){
        console.log(d);
        $.ajax({
        type:"post"
        ,url:'/Primary/seniorCat'
        ,data:d
        ,dataType:'json'
        ,success:function(res){

            //关闭弹框
            let index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
            parent.layer.close(index); //再执行关闭

            // 刷新父页面的table表格
            parent.refaseUser();
        }
        ,error:function (e){
            console.log("失败");
            console.log(e)
        }
    })
}